package com.hexu.event.service;

import com.hexu.event.dao.CommentDao;
import com.hexu.event.entity.Comment;

import java.util.List;

public class CommentService {
    CommentDao commentDao = new CommentDao();

    //保存评论
    public boolean addComment(Comment comment){
        return commentDao.addComment(comment);
    }

    //返回单个景点的所有评论
    public List<Comment> getComment(String attractionName){
        return commentDao.getComment(attractionName);
    }

    //返回单个景点的所有评论数
    public int commentsNumber(String attractionName){
        return commentDao.commentsNumber(attractionName);
    }
}
